Use Prettier for formatting CSS files
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox141 fixed)
Tracking | Status | |
---|---|---|
firefox141 | --- | fixed |
People
(Reporter: Honza, Assigned: hjones)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [recomp])
Attachments
(19 files, 2 obsolete files)
45.13 KB,
text/css
|
Details | |
44.60 KB,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1606785 - Format urlbar CSS files with Prettier r=#urlbar-reviewers,#desktop-theme-reviewers,dao
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
It would be great to have unified style formatting for all DevTools CSS files.
- Consistency across our code base
- Easier reviews
- IDE integrations (e.g. VS Code docs)
- Automation through
./mach eslint
WDYT?
Honza
Comment 1•5 years ago
|
||
What about doing it on the whole tree?
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Victor, I believe we talked about this when we discussed prettier. What do you think about linting CSS in devtools or all of tree?
Comment 3•5 years ago
|
||
Clearing stale needinfo.
If we decide to move forward, we should dupe bug 1508369 to this.
Comment 4•5 years ago
|
||
It is being discussed (on the roadmap or not)
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•8 months ago
|
||
We are not planning to move forward with this at the moment. There's some summarized context in bug 1921088 comment 2.
Instead we probably want to use the stylistic-stylelint rules rolled out more widely than the new tab code, which gives us some of the same benefits described here.
Assignee | ||
Comment 8•26 days ago
|
||
Assignee | ||
Comment 9•26 days ago
|
||
Updated•26 days ago
|
Updated•26 days ago
|
Comment 10•25 days ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Assignee | ||
Comment 11•25 days ago
|
||
I spent some time investigating different options for formatting out CSS files and reached the conclusion that we would be better off going with Prettier over stylistic-stylelint. I wrote a doc (internal access only) covering what I did/my conclusions, but just to summarize briefly Prettier:
- integrates better with our
./mach
tooling - integrates with IDEs and code editors in a way that provides a better developer experience
- should allow us to fix most formatting/stylistic errors before code gets pushed up for review
- is already familiar to most developers and has robust community support
Additionally some of the most objectionable changes Prettier was trying to make to our CSS files are avoidable by configuring printWidth
to not break lines so aggressively. Reopening this bug as I've already started the work to enable Prettier for our CSS files.
Assignee | ||
Comment 12•19 days ago
|
||
Assignee | ||
Comment 13•19 days ago
|
||
Assignee | ||
Comment 14•19 days ago
|
||
Assignee | ||
Comment 15•19 days ago
|
||
Assignee | ||
Comment 16•19 days ago
|
||
Assignee | ||
Comment 17•19 days ago
|
||
Assignee | ||
Comment 18•19 days ago
|
||
Assignee | ||
Comment 19•19 days ago
|
||
Assignee | ||
Comment 20•19 days ago
|
||
Assignee | ||
Comment 21•19 days ago
|
||
Assignee | ||
Comment 22•19 days ago
|
||
Assignee | ||
Comment 23•19 days ago
|
||
Assignee | ||
Comment 24•19 days ago
|
||
Assignee | ||
Comment 25•19 days ago
|
||
Assignee | ||
Comment 26•19 days ago
|
||
Assignee | ||
Comment 27•19 days ago
|
||
Updated•19 days ago
|
Updated•19 days ago
|
Updated•19 days ago
|
Assignee | ||
Comment 28•19 days ago
|
||
Updated•18 days ago
|
Updated•18 days ago
|
Comment 29•12 days ago
|
||
Comment 30•11 days ago
|
||
Comment 31•11 days ago
|
||
Backed out for causing multiple failures.
- Backout link
- Push with failures
- Failure Log dt @browser_rules_copy_styles.js
- Failure Log mozlint
- Failure Log SM @ struct-fields.js
Assignee | ||
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Comment 32•5 days ago
|
||
Comment 33•5 days ago
|
||
Comment 34•5 days ago
|
||
Comment 35•4 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b10012be5d43
https://hg.mozilla.org/mozilla-central/rev/85fb16265b32
https://hg.mozilla.org/mozilla-central/rev/9d0eb46721e2
https://hg.mozilla.org/mozilla-central/rev/86bb0e6d3c36
https://hg.mozilla.org/mozilla-central/rev/4045a0e95372
https://hg.mozilla.org/mozilla-central/rev/4ae3860a63bc
https://hg.mozilla.org/mozilla-central/rev/fe857c0eaa35
https://hg.mozilla.org/mozilla-central/rev/0f18da6e25ec
https://hg.mozilla.org/mozilla-central/rev/509b0ce5a617
https://hg.mozilla.org/mozilla-central/rev/f2aac34af2e9
https://hg.mozilla.org/mozilla-central/rev/a05e0c7a4de3
https://hg.mozilla.org/mozilla-central/rev/c6654494b739
https://hg.mozilla.org/mozilla-central/rev/bea2b9e6b9a7
https://hg.mozilla.org/mozilla-central/rev/fa19eaf842b6
https://hg.mozilla.org/mozilla-central/rev/cc2a6d98ffb4
https://hg.mozilla.org/mozilla-central/rev/01b13f86a4ac
https://hg.mozilla.org/mozilla-central/rev/593d12c6549d
Assignee | ||
Updated•4 days ago
|
Updated•4 days ago
|
Description
•